<?php
/**
 * Enable all google fonts in customizer.
 *
 * @package Manta
 * @since 1.0.0
 */

/**
 * Class for fetching complete google fonts list.
 *
 * @since  1.0.0
 */
class Manta_Google_Fonts {

	/**
	 * Holds the instance of this class.
	 *
	 * @since  1.0.0
	 * @access protected
	 * @var    object
	 */
	protected static $instance = null;

	/**
	 * Constructor method.
	 *
	 * @since  1.0.0
	 */
	public function __construct() {
	}

	/**
	 * Register hooked functions.
	 *
	 * @since 1.0.0
	 */
	public static function init() {
		add_filter( 'manta_sans_serif_web_fonts_list' , array( Manta_Google_Fonts::get_instance(), 'get_google_sans_fonts_list' ) );
		add_filter( 'manta_serif_web_fonts_list'      , array( Manta_Google_Fonts::get_instance(), 'get_google_serif_fonts_list' ) );
	}

	/**
	 * Returns the instance.
	 *
	 * @since  1.0.0
	 *
	 * @return object Customizer instance.
	 */
	public static function get_instance() {
		null === self::$instance && self::$instance = new self;
		return self::$instance;
	}

	/**
	 * Get Serif Google fonts.
	 *
	 * @since  1.0.0
	 * @return array  Returns array of required google fonts.
	 */
	public function get_google_serif_fonts_list() {
		$google_fonts = array(
			'Abhaya Libre',
			'Adamina',
			'Alegreya',
			'Alegreya SC',
			'Alice',
			'Alike',
			'Alike Angular',
			'Almendra',
			'Almendra SC',
			'Amethysta',
			'Amiri',
			'Andada',
			'Antic Didone',
			'Antic Slab',
			'Arapey',
			'Arbutus Slab',
			'Aref Ruqaa',
			'Artifika',
			'Arvo',
			'Asar',
			'Average',
			'Balthazar',
			'Belgrano',
			'Bentham',
			'BioRhyme',
			'BioRhyme Expanded',
			'Bitter',
			'Brawler',
			'Bree Serif',
			'Buenard',
			'Cambo',
			'Cantata One',
			'Cardo',
			'Caudex',
			'Cinzel',
			'Copse',
			'Cormorant',
			'Cormorant Garamond',
			'Cormorant Infant',
			'Cormorant SC',
			'Cormorant Unicase',
			'Cormorant Upright',
			'Coustard',
			'Crete Round',
			'Crimson Text',
			'Cutive',
			'David Libre',
			'Della Respira',
			'Domine',
			'Donegal One',
			'Droid Serif',
			'EB Garamond',
			'Eczar',
			'Enriqueta',
			'Esteban',
			'Fanwood Text',
			'Fasthand',
			'Fauna One',
			'Fenix',
			'Fjord One',
			'GFS Didot',
			'Gabriela',
			'Gentium Basic',
			'Gentium Book Basic',
			'Gilda Display',
			'Glegoo',
			'Goudy Bookletter 1911',
			'Gurajada',
			'Habibi',
			'Halant',
			'Hanuman',
			'Headland One',
			'Holtwood One SC',
			'IM Fell DW Pica',
			'IM Fell DW Pica SC',
			'IM Fell Double Pica',
			'IM Fell Double Pica SC',
			'IM Fell English',
			'IM Fell English SC',
			'IM Fell French Canon',
			'IM Fell French Canon SC',
			'IM Fell Great Primer',
			'IM Fell Great Primer SC',
			'Inika',
			'Inknut Antiqua',
			'Italiana',
			'Jacques Francois',
			'Josefin Slab',
			'Judson',
			'Junge',
			'Kadwa',
			'Kameron',
			'Karma',
			'Kotta One',
			'Kreon',
			'Kurale',
			'Laila',
			'Ledger',
			'Libre Baskerville',
			'Linden Hill',
			'Lora',
			'Lusitana',
			'Lustria',
			'Maitree',
			'Marcellus',
			'Marcellus SC',
			'Marko One',
			'Martel',
			'Mate',
			'Mate SC',
			'Merriweather',
			'Montaga',
			'Neuton',
			'Nokora',
			'Noticia Text',
			'Noto Serif',
			'Old Standard TT',
			'Oranienbaum',
			'Ovo',
			'PT Serif',
			'PT Serif Caption',
			'Peddana',
			'Petrona',
			'Playfair Display',
			'Playfair Display SC',
			'Podkova',
			'Poly',
			'Port Lligat Slab',
			'Prata',
			'Pridi',
			'Prociono',
			'Quando',
			'Quattrocento',
			'Radley',
			'Ramaraja',
			'Rasa',
			'Rhodium Libre',
			'Roboto Slab',
			'Rokkitt',
			'Rosarivo',
			'Rozha One',
			'Rufina',
			'Sahitya',
			'Sanchez',
			'Scheherazade',
			'Scope One',
			'Slabo 13px',
			'Slabo 27px',
			'Sorts Mill Goudy',
			'Source Serif Pro',
			'Sree Krushnadevaraya',
			'Stoke',
			'Suez One',
			'Sumana',
			'Sura',
			'Suranna',
			'Suravaram',
			'Taviraj',
			'Tienne',
			'Tinos',
			'Trirong',
			'Trocchi',
			'Trykker',
			'Ultra',
			'Unna',
			'Vesper Libre',
			'Vidaloka',
			'Volkhov',
			'Vollkorn',
			'Yrsa',
		);

		return $google_fonts;
	}

	/**
	 * Get Sans serif Google fonts.
	 *
	 * @since  1.0.0
	 * @return array  Returns array of required google fonts.
	 */
	public function get_google_sans_fonts_list() {
		$google_fonts = array(
			'ABeeZee',
			'Abel',
			'Aclonica',
			'Acme',
			'Actor',
			'Advent Pro',
			'Aldrich',
			'Alef',
			'Alegreya Sans',
			'Alegreya Sans SC',
			'Allerta',
			'Allerta Stencil',
			'Amaranth',
			'Amiko',
			'Anaheim',
			'Andika',
			'Antic',
			'Anton',
			'Archivo Black',
			'Archivo Narrow',
			'Arimo',
			'Armata',
			'Arsenal',
			'Arya',
			'Asap',
			'Assistant',
			'Asul',
			'Athiti',
			'Average Sans',
			'Basic',
			'Belleza',
			'BenchNine',
			'Biryani',
			'Bubbler One',
			'Cabin',
			'Cabin Condensed',
			'Cagliostro',
			'Cairo',
			'Cambay',
			'Candal',
			'Cantarell',
			'Cantora One',
			'Capriola',
			'Carme',
			'Carrois Gothic',
			'Carrois Gothic SC',
			'Catamaran',
			'Changa',
			'Chathura',
			'Chau Philomene One',
			'Chivo',
			'Coda Caption',
			'Convergence',
			'Cuprum',
			'Days One',
			'Denk One',
			'Dhurjati',
			'Didact Gothic',
			'Doppio One',
			'Dorsa',
			'Dosis',
			'Droid Sans',
			'Duru Sans',
			'Economica',
			'Ek Mukta',
			'El Messiri',
			'Electrolize',
			'Englebert',
			'Exo',
			'Exo 2',
			'Federo',
			'Fira Sans',
			'Fira Sans Condensed',
			'Fira Sans Extra Condensed',
			'Fjalla One',
			'Francois One',
			'Frank Ruhl Libre',
			'Fresca',
			'GFS Neohellenic',
			'Gafata',
			'Galdeano',
			'Geo',
			'Gidugu',
			'Gudea',
			'Hammersmith One',
			'Harmattan',
			'Heebo',
			'Hind',
			'Hind Guntur',
			'Hind Madurai',
			'Hind Siliguri',
			'Hind Vadodara',
			'Homenaje',
			'Imprima',
			'Inder',
			'Istok Web',
			'Jaldi',
			'Jockey One',
			'Josefin Sans',
			'Julius Sans One',
			'Jura',
			'Kanit',
			'Kantumruy',
			'Karla',
			'Khand',
			'Khula',
			'Kite One',
			'Krona One',
			'Lato',
			'Lekton',
			'Libre Franklin',
			'Mada',
			'Magra',
			'Mako',
			'Mallanna',
			'Mandali',
			'Marmelad',
			'Martel Sans',
			'Marvel',
			'Maven Pro',
			'Meera Inimai',
			'Merriweather Sans',
			'Metrophobic',
			'Michroma',
			'Miriam Libre',
			'Mitr',
			'Molengo',
			'Monda',
			'Montserrat',
			'Montserrat Alternates',
			'Montserrat Subrayada',
			'Mouse Memoirs',
			'Mukta Vaani',
			'Muli',
			'NTR',
			'News Cycle',
			'Nobile',
			'Noto Sans',
			'Numans',
			'Nunito',
			'Nunito Sans',
			'Open Sans',
			'Open Sans Condensed',
			'Orbitron',
			'Orienta',
			'Oswald',
			'Overpass',
			'Oxygen',
			'PT Sans',
			'PT Sans Caption',
			'PT Sans Narrow',
			'Padauk',
			'Palanquin',
			'Palanquin Dark',
			'Pathway Gothic One',
			'Pattaya',
			'Pavanam',
			'Paytone One',
			'Philosopher',
			'Play',
			'Pontano Sans',
			'Poppins',
			'Port Lligat Sans',
			'Pragati Narrow',
			'Prompt',
			'Proza Libre',
			'Puritan',
			'Quantico',
			'Quattrocento Sans',
			'Questrial',
			'Quicksand',
			'Rajdhani',
			'Raleway',
			'Ramabhadra',
			'Rambla',
			'Rationale',
			'Reem Kufi',
			'Roboto',
			'Roboto Condensed',
			'Ropa Sans',
			'Rosario',
			'Rubik',
			'Rubik Mono One',
			'Ruda',
			'Ruluko',
			'Rum Raisin',
			'Russo One',
			'Sansita',
			'Sarala',
			'Sarpanch',
			'Scada',
			'Secular One',
			'Seymour One',
			'Shanti',
			'Share Tech',
			'Signika',
			'Signika Negative',
			'Sintony',
			'Six Caps',
			'Snippet',
			'Source Sans Pro',
			'Spinnaker',
			'Strait',
			'Syncopate',
			'Tauri',
			'Teko',
			'Telex',
			'Tenali Ramakrishna',
			'Tenor Sans',
			'Text Me One',
			'Timmana',
			'Titillium Web',
			'Ubuntu',
			'Ubuntu Condensed',
			'Varela',
			'Varela Round',
			'Viga',
			'Voltaire',
			'Wendy One',
			'Wire One',
			'Work Sans',
			'Yanone Kaffeesatz',
			'Yantramanav',
		);

		return $google_fonts;
	}

}

Manta_Google_Fonts::init();
